#pragma once

#include <QByteArray>
#include <QDataStream>
#include <QTcpSocket>

namespace CustomProtocol {
    // 协议标记
    const quint32 START_MARKER = 0xA1B2C3D4;
    const quint32 END_MARKER = 0xD4C3B2A1;

    // 封装数据
    QByteArray packData(const QByteArray& content);

    // 解封装数据
    QByteArray unpackData(const QByteArray& packet, bool& success);

}
